package button.button;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.Toast;

public class ButtonsActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        //---the button is wired to an event handler button 1 & up---
        Button btn1 = (Button)findViewById(R.id.btnClickMe);
        btn1.setOnClickListener(btnListener);
        
      //---the button is wired to an event handler button 2 & right---
        Button btn2 = (Button)findViewById(R.id.btnClickMe2);
        btn2.setOnClickListener(btnListener2);
        
      //---the button is wired to an event handler button 3 & down---
        Button btn3 = (Button)findViewById(R.id.btnClickMe3);
        btn3.setOnClickListener(btnListener3);   
        
       //---the button is wired to an event handler button 4 & left---
        Button btn4 = (Button)findViewById(R.id.btnClickMe4);
        btn4.setOnClickListener(btnListener4);
/*     
      //---Speed SeekBar---
        SeekBar seek1 = (SeekBar)findViewById(R.id.seekBar1);
        speed_label = (TextView)findViewById(R.id.speed);
        
      //---Assign Current Speed to have the proper maximum speed.---
        speed = 
 */      
    }
    
    //---create an anonymous class to act as a button click listener button 1---
    private OnClickListener btnListener = new OnClickListener()
    {
    	public void onClick(View v)
    	{
    		Toast.makeText(getBaseContext(),
    				"up",
    				Toast.LENGTH_LONG).show();
    	}
    };
    
  //---create an anonymous class to act as a button click listener button 2---
    private OnClickListener btnListener2 = new OnClickListener()
    {
    	public void onClick(View v)
    	{
    		Toast.makeText(getBaseContext(),
    				"right",
    				Toast.LENGTH_LONG).show();
    	}
    };
    
    //---create an anonymous class to act as a button click listener button 3---
    private OnClickListener btnListener3 = new OnClickListener()
    {
    	public void onClick(View v)
    	{
    		Toast.makeText(getBaseContext(),
    				"down",
    				Toast.LENGTH_LONG).show();
    	}
    };
    
    //---create an anonymous class to act as a button click listener button 4---
    private OnClickListener btnListener4 = new OnClickListener()
    {
    	public void onClick(View v)
    	{
    		Toast.makeText(getBaseContext(),
    				"left",
    				Toast.LENGTH_LONG).show();
    	}
    };
}